import {requests} from "@/api/request";
import type { PolygonData } from "@/class/map/Polygon";

/**
 * 上传新数据
 * @param data
 * @returns {*}
 */
export const reqPostPolygon =(data:PolygonData)=>requests({
    url:'/polygon',
    data,
    method:"post"
})
/**
 * 更新数据
 * @param data
 * @returns {*}
 */
export const reqPutPolygon = (data:PolygonData)=>requests({
    url:'/polygon',
    data,
    method:"put"
})